<p>double-data-binding works!</p>

<app-sizer [(size)]="appFontSize"></app-sizer>
<div [style.font-size.px]="appFontSize">子组件修改后的FontSize：{{appFontSize}}</div>


<input type="text" [(ngModel)]="iptVal" placeholder="双向数据绑定">
<p>input value is {{iptVal}}</p>



<!-- src/app/app.component.html -->
<form  class="input-group">
  <input type="text"  [(ngModel)]="user.name" name="name" placeholder="请输入名称" class="input-group-text"/>
  <input type="text"  [(ngModel)]="user.address" name="address" placeholder="请输入地址" class="input-group-text"/>
  <button type="button" class="btn btn-success" (click)="doSubmit($event)"> 表单提交</button>
</form>
<div>
  {{user.name}}
</div>


